\startenvironment layout
\resetnumber[page]
\setupindenting[medium,yes]
\setupheadertexts
	[\textrule{\ss{ \bf{\headnumber[chapter]} \getmarking[chapter]}}] 	%[{page \pagenumber}]
	[]		%[{ \getmarking[chapter]}]

\setuphead[section,subject][style={\ss\bfa},
  before={\bigskip\bigskip}, after={}]
\setuphead[chapter][style={\ss\bfd}, header=empty]
\setuppagenumbering[state=start, location=footer, location=right , style=\bf\ss ]

\setupcaptions[headstyle=\ss\bf,style=\ss\bf]
\stopenvironment
